{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#%run NB01-Load.ipynb\n",
    "%run NB02-EDA-MetaData.ipynb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Percentage of Unique Values Per Column' is 100%\")\n",
    "for column_name in df_columns_percentage_of_unique_values:\n",
    "    if df_columns_percentage_of_unique_values[column_name] == 1:\n",
    "        print (column_name, 'dtype: ', df[column_name].dtype)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Percentage of Unique Values Per Column' is GTE 80%?\")\n",
    "for column_name in df_columns_percentage_of_unique_values:\n",
    "    if df_columns_percentage_of_unique_values[column_name] >= 0.80:\n",
    "        print (column_name, 'dtype: ', df[column_name].dtype)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Count of Unique Values Per Column' is 2\")\n",
    "for column_name in df_columns_number_of_unique_values:\n",
    "    if df_columns_number_of_unique_values[column_name] == 2:\n",
    "        print (column_name, 'dtype: ', df[column_name].dtype)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Count of Unique Values Per Column' is 2\")\n",
    "for column_name in df_columns_number_of_unique_values:\n",
    "    if df_columns_number_of_unique_values[column_name] == 2:\n",
    "        print (df[column_name].value_counts(dropna=False))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Count of Unique Values Per Column' is 3\")\n",
    "for column_name in df_columns_number_of_unique_values:\n",
    "    if df_columns_number_of_unique_values[column_name] == 3:\n",
    "        print(column_name, 'dtype: ', df[column_name].dtype)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Count of Unique Values Per Column' is 3\")\n",
    "for column_name in df_columns_number_of_unique_values:\n",
    "    if df_columns_number_of_unique_values[column_name] == 3:\n",
    "        print(df[column_name].value_counts(dropna=False))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Percentage of Missing Values Per Column' is GTE 60%\")\n",
    "for column_name in df_columns_missing_values_percentage:\n",
    "    if df_columns_missing_values_percentage[column_name] >= 0.60:\n",
    "        print (column_name, df_columns_missing_values_percentage[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Columns where 'Percentage of Missing Values Per Column' is GTE 30%\")\n",
    "for column_name in df_columns_missing_values_percentage:\n",
    "    if df_columns_missing_values_percentage[column_name] >= 0.30:\n",
    "        print (column_name, df_columns_missing_values_percentage[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Categorical Variables with Missing Values\")\n",
    "for column_name in df_categorical_column_names:\n",
    "    if df_columns_missing_values_percentage[column_name] > 0.00:\n",
    "        print (column_name, df_columns_missing_values_percentage[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(\"Numerical Variables with Missing Values\")\n",
    "for column_name in df_numerical_column_names:\n",
    "    if df_columns_missing_values_percentage[column_name] > 0.00:\n",
    "        print (column_name, df_columns_missing_values_percentage[column_name])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1) Always Positive / Never Negative  \n",
    "2) Always Negative / Never Positive  \n",
    "3) Always Between 1 and 0  \n",
    "4) Has Zero  \n",
    "5) Never Zero  \n",
    "6) Has Mean of 0  \n",
    "7) Has Standard Deviation of 1  \n",
    "8) Is Mean Centered  \n",
    "9) Is Scaled  \n",
    "10) Is Z-Score (AKA Standardized, Normalized, Centered and Scaled)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1) Always Positive / Never Negative\n",
    "print(\"Numerical Variables that are Always Positive / Never Negative\")\n",
    "for column_name in df_columns_always_positive_flag:\n",
    "    if df_columns_always_positive_flag[column_name] == True:\n",
    "        print (column_name, df_columns_always_positive_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2) Always Negative / Never Positive\n",
    "print(\"Numerical Variables that are Always Negative / Never Positive\")\n",
    "for column_name in df_columns_always_negative_flag:\n",
    "    if df_columns_always_negative_flag[column_name] == True:\n",
    "        print (column_name, df_columns_always_negative_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 3) Always Between 1 and 0  \n",
    "print(\"Numerical Variables that are Always Between 1 and 0\")\n",
    "for column_name in df_columns_always_between_one_and_zero_flag:\n",
    "    if df_columns_always_between_one_and_zero_flag[column_name] == True:\n",
    "        print (column_name, df_columns_always_between_one_and_zero_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 4) Has Zero  \n",
    "print(\"Numerical Variables that are Has Zero\")\n",
    "for column_name in df_columns_has_zero_flag:\n",
    "    if df_columns_has_zero_flag[column_name] == True:\n",
    "        print (column_name, df_columns_has_zero_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 5) Never Zero  \n",
    "print(\"Numerical Variables that are Never Zero\")\n",
    "for column_name in df_columns_never_zero_flag:\n",
    "    if df_columns_never_zero_flag[column_name] == True:\n",
    "        print (column_name, df_columns_never_zero_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 6) Has Mean of 0  \n",
    "print(\"Numerical Variables that are Has Mean of 0\")\n",
    "for column_name in df_columns_has_mean_of_zero_flag:\n",
    "    if df_columns_has_mean_of_zero_flag[column_name] == True:\n",
    "        print (column_name, df_columns_has_mean_of_zero_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 7) Has Standard Deviation of 1  \n",
    "print(\"Numerical Variables that are Has Standard Deviation of 1\")\n",
    "for column_name in df_columns_has_standard_deviation_of_one_flag:\n",
    "    if df_columns_has_standard_deviation_of_one_flag[column_name] == True:\n",
    "        print (column_name, df_columns_has_standard_deviation_of_one_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 8) Is Mean Centered  \n",
    "print(\"Numerical Variables that are Is Centered\")\n",
    "for column_name in df_columns_is_mean_centered_flag:\n",
    "    if df_columns_is_mean_centered_flag[column_name] == True:\n",
    "        print (column_name, df_columns_is_mean_centered_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 9) Is Scaled  \n",
    "print(\"Numerical Variables that are Is Scaled\")\n",
    "for column_name in df_columns_is_scaled_flag:\n",
    "    if df_columns_is_scaled_flag[column_name] == True:\n",
    "        print (column_name, df_columns_is_scaled_flag[column_name])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 10) Is Z-Score (AKA Standardized, Normalized, Centered and Scaled)\n",
    "print(\"Numerical Variables that are Is Z-Score\")\n",
    "for column_name in df_columns_is_z_score_flag:\n",
    "    if df_columns_is_z_score_flag[column_name] == True:\n",
    "        print (column_name, df_columns_is_z_score_flag[column_name])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Always Between 1 and 0 == True, but not listed as \"normalized\" in the data dictionary\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['AMT_ANNUITY'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['AMT_CREDIT'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['AMT_GOODS_PRICE'].value_counts()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
